package com.yingli.component.activity.launch;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.yingli.component.R;

public class SingleTopActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_single_top);
        findViewById(R.id.tv_start).setOnClickListener(v->{
            Intent intent = new Intent(this,SingleTopActivity.class);
            intent.putExtra("singleTop","this is singleTop activity");
            startActivity(intent);
        });

        findViewById(R.id.tv_standard2).setOnClickListener(v->{
            startActivity(new Intent(this,Standard2Activity.class));
        });
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        String tag = intent.getStringExtra("singleTop");
        Log.i("singleTopInstance",tag);

    }
}
